package com.lin.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
@ConfigurationProperties(PayProperties.PREFIX)
public class PayProperties {
    public static final String PREFIX = "cs.pay";

    /**
     * 支付宝支付配置参数
     */
    public static final String ALIPAY_GATEWAY = "gateway";
    public static final String ALIPAY_APPID = "appid";
    public static final String ALIPAY_MYPRIVATEKEY = "myprivatekey";
    public static final String ALIPAY_ALI_PUBLIC = "publickey";
    public static final String ALIPAY_SIGNTYPE = "signtype";
    public static final String ALIPAY_NOTIFY_URL = "notify-url";
    /**
     * 微信配置参数
     */
    public static final String WX_APPID = "appid";
    public static final String WX_MCHID = "mch_id";
    public static final String WX_SECRET = "secret";
    public static final String WX_APIKEY = "apikey";
    public static final String WX_NOTIFY_URL = "notify-url";
    public static final String WX_URL = "url";
    public static final String WX_CERTURL = "certurl";

    /**
     * paypal配置参数
     */
    public static final String BN_CODE = "testlingo";
    public static final String CLIENT_ID = "client-id";
    public static final String CLIENT_SECRET = "client-secret";
    public static final String EXPRESS_CHECKOUT_URL = "express-checkout-url";
    public static final String ACCESS_TOKEN_URL = "access-token-url";
    public static final String CREATE_PAYMENT_URL = "create-payment-url";
    public static final String EXECUTE_PAYMENT_URL = "execute-payment-url";
    public static final String GET_PAYMENT_URL = "get-payment-url";
    public static final String RETURN_URL = "return-url";
    public static final String CANCEL_URL = "cancel-url";

    public static final String CREATE_ORDER = "create-order";
    public static final String ORDER_DETAIL = "order-detail";
    public static final String CAPTURE_PAYMENT = "capture-payment";
    public static final String CAPTURE_REFUND = "capture-refund";



    private final Map<String, String> wx = new HashMap<>();

    private final Map<String, String> alipay = new HashMap<>();

    private Map<String, String> paypal = new HashMap<>();

    public Map<String, String> getWx() {
        return wx;
    }

    public Map<String, String> getAlipay() {
        return alipay;
    }

    public Map<String, String> getPaypal() {
        return paypal;
    }

    public void setPaypal(Map<String, String> paypal) {
        this.paypal = paypal;
    }
}
